﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BasicSelectorTag.aspx.cs" Inherits="LearnJquery.Selector.BasicSelectorTag" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="../js/jquery-1.4.1-vsdoc.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ul>
            <li>List item 1</li>
            <li>List item 2</li>
            <li>List item 3</li>
            <li>List item 4</li>
            <li>List item 5</li>
            <li>List item 6</li>
        </ul>
    </div>
    <div>
        <input type="button" value="first" onclick="first()" />
        <input type="button" value="last" onclick="last()" />
    </div>
    <div>
        <select>
            <option selected="selected">Select 1</option>
            <option> Select 2</option>
        </select>
        <input type="button" value="not" onclick="not()" />
    </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function first() {
        var li = $("li").first();
        alert(li.html());
    }

    function last() {
        var li = $("li").last();
        alert(li.html());
    }

    function not() {
        var p = $("label:not(:checked)");
        alert(p.html());
    }
</script>